package com.ngmaster.apiserver.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BaiduConfig {

    @Value("${baidu.map.uri}")
    private String uri;

    @Value("${baidu.map.api}")
    private String api;

    @Value("${baidu.map.ak}")
    private String ak;

    @Value("${baidu.map.isDetailAddress}")
    private boolean detailAddress;

    @Value("${baidu.map.isContainsCountry}")
    private boolean isContainsCountry;

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getApi() {
        return api;
    }

    public void setApi(String api) {
        this.api = api;
    }

    public String getAk() {
        return ak;
    }

    public void setAk(String ak) {
        this.ak = ak;
    }

    public boolean isDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(boolean detailAddress) {
        this.detailAddress = detailAddress;
    }

    public boolean isContainsCountry() {
        return isContainsCountry;
    }

    public void setContainsCountry(boolean containsCountry) {
        isContainsCountry = containsCountry;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("BaiduConfig{");
        sb.append("uri='").append(uri).append('\'');
        sb.append(", api='").append(api).append('\'');
        sb.append(", ak='").append(ak).append('\'');
        sb.append(", detailAddress=").append(detailAddress);
        sb.append(", isContainsCountry=").append(isContainsCountry);
        sb.append('}');
        return sb.toString();
    }
}
